<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libschc: fragmenter.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libschc
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">fragmenter.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="fragmenter_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* (c) 2018 - idlab - UGent - imec</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Bart Moons</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * This file is part of the SCHC stack implementation</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; </div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#ifndef __SCHCFRAGMENTER_H__</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#define __SCHCFRAGMENTER_H__</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160; </div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="schc_8h.html">schc.h</a>&quot;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="schc__config_8h.html">schc_config.h</a>&quot;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="fragmenter_8h.html#ab014037ee9ccea0cea6b2d5366dee902">   22</a></span>&#160;<span class="preprocessor">#define SCHC_FRAG_INPUT         2</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="fragmenter_8h.html#a4ae988f716a3d42117f0777a56f8f1c3">   27</a></span>&#160;<span class="preprocessor">#define SCHC_ACK_INPUT          1</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="fragmenter_8h.html#a609c4c5b7a6cdc56c3b1fc47c2cac402">   33</a></span>&#160;<span class="preprocessor">#define SCHC_SUCCESS            0</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="fragmenter_8h.html#a8f937d9fe4a9fb1d4fa406cde779fffd">   39</a></span>&#160;<span class="preprocessor">#define SCHC_END                3</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; </div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="fragmenter_8h.html#a72455d89c3af7b0868fbaf7095e5af11">   44</a></span>&#160;<span class="preprocessor">#define SCHC_FAILURE            -1</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="fragmenter_8h.html#a702d10e122e8809285882b69ae2e69a1">   49</a></span>&#160;<span class="preprocessor">#define SCHC_NO_FRAGMENTATION   -2</span></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160; </div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34">   52</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34a6736812226bab580f621c5e1de53d861">   53</a></span>&#160;    <a class="code" href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34a8131166fb07d0aa1155e334e90b63d2d">INIT_TX</a> = 0, <a class="code" href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34a67be7a5f47004345047b32fff72a2230">SEND</a> = 1, <a class="code" href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34ad8c334cdd607abfeba91555c1b63cd5a">RESEND</a> = 2, <a class="code" href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34a6736812226bab580f621c5e1de53d861">WAIT_BITMAP</a> = 3, <a class="code" href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34a8dedf42db360ffa63832fa48fb9ddeee">END_TX</a> = 4, <a class="code" href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34a0f886785b600b91048fcdc434c6b4a8e">ERR</a> = 5</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;} <a class="code" href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34">tx_state</a>;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160; </div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6f">   56</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6fa9a3cdfd5436e5486043ccdd4e8549dcf">   57</a></span>&#160;    <a class="code" href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6fa6fea2421f5cc1e8bc1ecebd848139362">RECV_WINDOW</a> = 0, <a class="code" href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6fa9a3cdfd5436e5486043ccdd4e8549dcf">WAIT_NEXT_WINDOW</a> = 1, <a class="code" href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6fa84114eb766ef9186899ff21358c0b416">WAIT_MISSING_FRAG</a> = 2, <a class="code" href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6fab39d14dff9148f467ef7a253b80b40bd">WAIT_END</a> = 3, <a class="code" href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6fa204deb4800b60b28307aa8a00a85ee36">END_RX</a> = 4, <a class="code" href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6fa781ad2788df9e25c59a70894c7832096">ABORT</a> = 5</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;} <a class="code" href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6f">rx_state</a>;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160; </div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="structschc__mbuf__t.html">   60</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structschc__mbuf__t.html">schc_mbuf_t</a> {</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="comment">/* the selected slot */</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="structschc__mbuf__t.html#aae4db53402585e2c77bad6a0925b6b7c">   62</a></span>&#160;    uint32_t <a class="code" href="structschc__mbuf__t.html#aae4db53402585e2c77bad6a0925b6b7c">slot</a>;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="comment">/* start of memory block */</span></div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="structschc__mbuf__t.html#ab60a2b461fb016ef880a366635c4f6d6">   64</a></span>&#160;    uint8_t* <a class="code" href="structschc__mbuf__t.html#ab60a2b461fb016ef880a366635c4f6d6">ptr</a>;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="comment">/* length of the fragment */</span></div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="structschc__mbuf__t.html#ab7bd5d1755c9d4ce991fe1eb49236ecc">   66</a></span>&#160;    uint16_t <a class="code" href="structschc__mbuf__t.html#ab7bd5d1755c9d4ce991fe1eb49236ecc">len</a>;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="comment">/* the fragment to which the mbuf belongs to */</span></div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="structschc__mbuf__t.html#a01f8d12db0d22e4cc1c8392e7aa87eb2">   68</a></span>&#160;    uint8_t <a class="code" href="structschc__mbuf__t.html#a01f8d12db0d22e4cc1c8392e7aa87eb2">frag_cnt</a>;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="comment">/* the bit offset when formatted */</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="structschc__mbuf__t.html#a05e49e98a8e2a6df87d42355fa8e6969">   70</a></span>&#160;    uint8_t <a class="code" href="structschc__mbuf__t.html#a05e49e98a8e2a6df87d42355fa8e6969">offset</a>;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="comment">/* pointer to the next fragment*/</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="structschc__mbuf__t.html#ad414fc5cf65894521e5b8131c8ff8618">   72</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="structschc__mbuf__t.html">schc_mbuf_t</a> *<a class="code" href="structschc__mbuf__t.html#ad414fc5cf65894521e5b8131c8ff8618">next</a>;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;} <a class="code" href="fragmenter_8h.html#a8e32bf67127c30c23e08e9974f02c5f0">schc_mbuf_t</a>;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    </div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="structschc__fragmentation__ack__t.html">   76</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structschc__fragmentation__ack__t.html">schc_fragmentation_ack_t</a> {</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="comment">/* the rule id included in the ack */</span></div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="structschc__fragmentation__ack__t.html#a94b9c37ec44b2f4c8158f3196ec7902a">   78</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__ack__t.html#a94b9c37ec44b2f4c8158f3196ec7902a">rule_id</a>[<a class="code" href="schc_8h.html#ab264125e090b773a3c62c0587e2311f3">RULE_SIZE_BYTES</a>];</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="comment">/* the encoded bitmap included in the ack */</span></div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="structschc__fragmentation__ack__t.html#ace8c95d14212b116695068cb09141813">   80</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__ack__t.html#ace8c95d14212b116695068cb09141813">bitmap</a>[<a class="code" href="schc__config_8h.html#a5e6121b65e73cd727a9af2331bf5d897">BITMAP_SIZE_BYTES</a>];</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="comment">/* the window included in the ack */</span></div>
<div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="structschc__fragmentation__ack__t.html#ae3470b3cdcf9e4a38e26ff62dd0f82b3">   82</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__ack__t.html#ae3470b3cdcf9e4a38e26ff62dd0f82b3">window</a>[1];</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="comment">/* the DTAG received in the ack */</span></div>
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="structschc__fragmentation__ack__t.html#a6a75f999fa56f3f64e0c8e555e3da58c">   84</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__ack__t.html#a6a75f999fa56f3f64e0c8e555e3da58c">dtag</a>[1];</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <span class="comment">/* the MIC bit received in the ack */</span></div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="structschc__fragmentation__ack__t.html#a9fbf76c0b89c25838cf8f4100f8facea">   86</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__ack__t.html#a9fbf76c0b89c25838cf8f4100f8facea">mic</a>;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="comment">/* the fcn value this ack belongs to */</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="structschc__fragmentation__ack__t.html#a777f3b35b0d37bb49b5d41f80c862420">   88</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__ack__t.html#a777f3b35b0d37bb49b5d41f80c862420">fcn</a>;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160; </div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;} <a class="code" href="fragmenter_8h.html#a71d11b7d40657f1abe84aeed57a22b43">schc_fragmentation_ack_t</a>;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html">   92</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> {</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="comment">/* the device id of the connection */</span></div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a87361e46e93bdf8d6f9cb60cb8f0b5de">   94</a></span>&#160;    uint32_t <a class="code" href="structschc__fragmentation__t.html#a87361e46e93bdf8d6f9cb60cb8f0b5de">device_id</a>;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="comment">/* the length of the packet */</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a81a06b0db6f570800959533e1fd2ce58">   96</a></span>&#160;    uint16_t <a class="code" href="structschc__fragmentation__t.html#a81a06b0db6f570800959533e1fd2ce58">packet_len</a>;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="comment">/* a pointer to the start of the unfragmented, compressed packet in a bit array */</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a4fa56a7c26f1dcdcaed54367974052cb">   98</a></span>&#160;    <a class="code" href="structschc__bitarray__t.html">schc_bitarray_t</a>* <a class="code" href="structschc__fragmentation__t.html#a4fa56a7c26f1dcdcaed54367974052cb">bit_arr</a>;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="comment">/* the start of the packet + the total length */</span></div>
<div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a85a9626c3f4d779ed07f3bde3e745143">  100</a></span>&#160;    uint8_t* <a class="code" href="structschc__fragmentation__t.html#a85a9626c3f4d779ed07f3bde3e745143">tail_ptr</a>;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="comment">/* the rule which will be applied to the header */</span></div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a3d0044911dc3e6c6c5161f85133771ca">  102</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__t.html#a3d0044911dc3e6c6c5161f85133771ca">rule_id</a>[<a class="code" href="schc_8h.html#ab264125e090b773a3c62c0587e2311f3">RULE_SIZE_BYTES</a>];</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="comment">/* the maximum transfer unit of this connection */</span></div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#aacb88301231fdf7ebf596250d3b75201">  104</a></span>&#160;    uint16_t <a class="code" href="structschc__fragmentation__t.html#aacb88301231fdf7ebf596250d3b75201">mtu</a>;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="comment">/* the duty cycle in ms */</span></div>
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#ac3fbcae2ee4198df9d04438d63d97361">  106</a></span>&#160;    uint32_t <a class="code" href="structschc__fragmentation__t.html#ac3fbcae2ee4198df9d04438d63d97361">dc</a>;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="comment">/* the message integrity check over the full, compressed packet */</span></div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a2f83092fddf60c20b720b909c4b632a4">  108</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__t.html#a2f83092fddf60c20b720b909c4b632a4">mic</a>[<a class="code" href="schc__config_8h.html#adfbf14de3d8d2907750758406ced72db">MIC_SIZE_BYTES</a>];</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    <span class="comment">/* the fragment counter in the current window</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;<span class="comment">     * ToDo: we only support fixed FCN length</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="comment">     * */</span></div>
<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a9507d09aa22017fdee75233eb10ce4eb">  112</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__t.html#a9507d09aa22017fdee75233eb10ce4eb">fcn</a>;</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    <span class="comment">/* the current window */</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a177e3d8b7af0f3b3590d8f90dd765a71">  114</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__t.html#a177e3d8b7af0f3b3590d8f90dd765a71">window</a>;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="comment">/* the total number of windows transmitted */</span></div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#aadd2eea980b920a4c4e20abf77fff73a">  116</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__t.html#aadd2eea980b920a4c4e20abf77fff73a">window_cnt</a>;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="comment">/* the current DTAG */</span></div>
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a34281059a41f1b93a203dfff5e54f845">  118</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__t.html#a34281059a41f1b93a203dfff5e54f845">dtag</a>;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="comment">/* the total number of fragments sent */</span></div>
<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#ad81c9ba5e6a581e013e4b3bafce08474">  120</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__t.html#ad81c9ba5e6a581e013e4b3bafce08474">frag_cnt</a>;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    <span class="comment">/* the bitmap of the fragments sent */</span></div>
<div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#acf5022a1d397d0501594591d24b6c0bf">  122</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__t.html#acf5022a1d397d0501594591d24b6c0bf">bitmap</a>[<a class="code" href="schc__config_8h.html#a5e6121b65e73cd727a9af2331bf5d897">BITMAP_SIZE_BYTES</a>];</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="comment">/* the number of transmission attempts */</span></div>
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a338c5d4c63ddd31949a4230de91310bc">  124</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__t.html#a338c5d4c63ddd31949a4230de91310bc">attempts</a>;</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="comment">/* the current state for the sending device */</span></div>
<div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#ab7f821a4a6b266de4f6cb79970d8ce4c">  126</a></span>&#160;    <a class="code" href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34">tx_state</a> <a class="code" href="structschc__fragmentation__t.html#ab7f821a4a6b266de4f6cb79970d8ce4c">TX_STATE</a>;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="comment">/* the current state for the receiving device */</span></div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a93c490405c940960cb2dff7c7566be50">  128</a></span>&#160;    <a class="code" href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6f">rx_state</a> <a class="code" href="structschc__fragmentation__t.html#a93c490405c940960cb2dff7c7566be50">RX_STATE</a>;</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="comment">/* the function to call when the fragmenter has something to send */</span></div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a0d771b7ddff550f4e30b238f1a332572">  130</a></span>&#160;    uint8_t (*<a class="code" href="structschc__fragmentation__t.html#a0d771b7ddff550f4e30b238f1a332572">send</a>)(uint8_t* data, uint16_t length, uint32_t <a class="code" href="structschc__fragmentation__t.html#a87361e46e93bdf8d6f9cb60cb8f0b5de">device_id</a>);</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="comment">/* the timer task */</span></div>
<div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#af54664c2e4cfb10cc250896f070f6d5b">  132</a></span>&#160;    void (*<a class="code" href="structschc__fragmentation__t.html#af54664c2e4cfb10cc250896f070f6d5b">post_timer_task</a>)(void (*timer_task)(<span class="keywordtype">void</span>* conn), uint32_t <a class="code" href="structschc__fragmentation__t.html#a87361e46e93bdf8d6f9cb60cb8f0b5de">device_id</a>,</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            uint32_t time_ms, <span class="keywordtype">void</span> *arg);</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="comment">/* this function is called when the last rx timer expires */</span></div>
<div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a0db2f7a250e964ee0bad8c0b8cc0b97c">  135</a></span>&#160;    void (*<a class="code" href="structschc__fragmentation__t.html#a0db2f7a250e964ee0bad8c0b8cc0b97c">end_rx</a>)(<span class="keyword">struct </span><a class="code" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn);</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    <span class="comment">/* this function is called once the device reaches the END_TX state */</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a3ae53dfe7edd71d58200c6fb6823f6be">  137</a></span>&#160;    void (*<a class="code" href="structschc__fragmentation__t.html#a3ae53dfe7edd71d58200c6fb6823f6be">end_tx</a>)();</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    <span class="comment">/* this callback may be used to remove a timer entry */</span></div>
<div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a3b14a9023ad626cf661a46453fc6919d">  139</a></span>&#160;    void (*<a class="code" href="structschc__fragmentation__t.html#a3b14a9023ad626cf661a46453fc6919d">remove_timer_entry</a>)(uint32_t <a class="code" href="structschc__fragmentation__t.html#a87361e46e93bdf8d6f9cb60cb8f0b5de">device_id</a>);</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <span class="comment">/* indicates whether a timer has expired */</span></div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a2e2e9e70fcb228003fbe7f4306a07be4">  141</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__t.html#a2e2e9e70fcb228003fbe7f4306a07be4">timer_flag</a>;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="comment">/* indicates if a fragment is received or this is a callback */</span></div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a9331778f9d6b6149c749329bc65f3bcb">  143</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__t.html#a9331778f9d6b6149c749329bc65f3bcb">input</a>;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <span class="comment">/* the last received ack */</span></div>
<div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a95c3a12413953d5878e1a44ddb0da57b">  145</a></span>&#160;    <a class="code" href="structschc__fragmentation__ack__t.html">schc_fragmentation_ack_t</a> <a class="code" href="structschc__fragmentation__t.html#a95c3a12413953d5878e1a44ddb0da57b">ack</a>;</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    <span class="comment">/* the start of the mbuf chain */</span></div>
<div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#afd9900b8ae4055a3d3014d20ee28ea2d">  147</a></span>&#160;    <a class="code" href="structschc__mbuf__t.html">schc_mbuf_t</a> *<a class="code" href="structschc__fragmentation__t.html#afd9900b8ae4055a3d3014d20ee28ea2d">head</a>;</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    <span class="comment">/* the rule in use */</span></div>
<div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a5403c6a449781191d2d5e129baf50843">  149</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="structschc__rule__t.html">schc_rule_t</a>* <a class="code" href="structschc__fragmentation__t.html#a5403c6a449781191d2d5e129baf50843">schc_rule</a>;</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <span class="comment">/* the rule size in bits */</span></div>
<div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="structschc__fragmentation__t.html#a8a6c636f8d863fc3db680da64ee889c1">  151</a></span>&#160;    uint8_t <a class="code" href="structschc__fragmentation__t.html#a8a6c636f8d863fc3db680da64ee889c1">RULE_SIZE</a>;</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;} <a class="code" href="fragmenter_8h.html#a250ace05899a868a846b1bdaaa30288b">schc_fragmentation_t</a>;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160; </div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;int8_t <a class="code" href="fragmenter_8h.html#adaabb8a36ff87d9f89d8215b2773c6c7">schc_fragmenter_init</a>(<a class="code" href="structschc__fragmentation__t.html">schc_fragmentation_t</a>* tx_conn,</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        uint8_t (*send)(uint8_t* data, uint16_t length, uint32_t device_id),</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <span class="keywordtype">void</span> (*end_rx)(<a class="code" href="structschc__fragmentation__t.html">schc_fragmentation_t</a>* conn),</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <span class="keywordtype">void</span> (*remove_timer_entry)(uint32_t device_id));</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;int8_t <a class="code" href="fragmenter_8h.html#a5c375e7b44652a0eccb9248083a6251d">schc_fragment</a>(<a class="code" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *tx_conn);</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;int8_t <a class="code" href="fragmenter_8h.html#a6a248f74b7a8b0ef5f7dbc3f418e05a8">schc_reassemble</a>(<a class="code" href="structschc__fragmentation__t.html">schc_fragmentation_t</a>* rx_conn);</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;<span class="keywordtype">void</span> <a class="code" href="fragmenter_8h.html#af04b125eaaa72e66f782bdb592133a27">schc_reset</a>(<a class="code" href="structschc__fragmentation__t.html">schc_fragmentation_t</a>* conn);</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160; </div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;<a class="code" href="structschc__fragmentation__t.html">schc_fragmentation_t</a>* <a class="code" href="fragmenter_8h.html#a555170940dd8eb3a6b64405f28e4655f">schc_input</a>(uint8_t* data, uint16_t len,</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        <a class="code" href="structschc__fragmentation__t.html">schc_fragmentation_t</a>* rx_conn, uint32_t device_id);</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;<span class="keywordtype">void</span> <a class="code" href="fragmenter_8h.html#abb5688d5a6d4d0f4f955951b6ee130b1">schc_ack_input</a>(uint8_t* data, uint16_t len, <a class="code" href="structschc__fragmentation__t.html">schc_fragmentation_t</a>* tx_conn,</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        uint32_t device_id);</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;<a class="code" href="structschc__fragmentation__t.html">schc_fragmentation_t</a>* <a class="code" href="fragmenter_8h.html#a4be088b297563aa42398b23d40868b37">schc_fragment_input</a>(uint8_t* data, uint16_t len,</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        uint32_t device_id);</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;<a class="code" href="structschc__fragmentation__t.html">schc_fragmentation_t</a>* <a class="code" href="fragmenter_8h.html#ab1b728ad496229979c1eea633a13076d">schc_get_connection</a>(uint32_t device_id);</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160; </div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;uint16_t <a class="code" href="fragmenter_8h.html#a974581b10381381bafe401fc2ddc54c7">get_mbuf_len</a>(<a class="code" href="structschc__mbuf__t.html">schc_mbuf_t</a> *head);</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;<span class="keywordtype">void</span> <a class="code" href="fragmenter_8h.html#a3b3e7a45b2ff0f407adfcc266f47c3dc">mbuf_copy</a>(<a class="code" href="structschc__mbuf__t.html">schc_mbuf_t</a> *head, uint8_t* ptr);</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160; </div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;}</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160; </div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="afragmenter_8h_html_af04b125eaaa72e66f782bdb592133a27"><div class="ttname"><a href="fragmenter_8h.html#af04b125eaaa72e66f782bdb592133a27">schc_reset</a></div><div class="ttdeci">void schc_reset(schc_fragmentation_t *conn)</div><div class="ttdoc">reset a connection</div><div class="ttdef"><b>Definition:</b> fragmenter.c:818</div></div>
<div class="ttc" id="afragmenter_8h_html_a38ccd754938e6c276447dff49f5a3a34a8131166fb07d0aa1155e334e90b63d2d"><div class="ttname"><a href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34a8131166fb07d0aa1155e334e90b63d2d">INIT_TX</a></div><div class="ttdef"><b>Definition:</b> fragmenter.h:53</div></div>
<div class="ttc" id="afragmenter_8h_html_a38ccd754938e6c276447dff49f5a3a34ad8c334cdd607abfeba91555c1b63cd5a"><div class="ttname"><a href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34ad8c334cdd607abfeba91555c1b63cd5a">RESEND</a></div><div class="ttdef"><b>Definition:</b> fragmenter.h:53</div></div>
<div class="ttc" id="afragmenter_8h_html_a38ccd754938e6c276447dff49f5a3a34a8dedf42db360ffa63832fa48fb9ddeee"><div class="ttname"><a href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34a8dedf42db360ffa63832fa48fb9ddeee">END_TX</a></div><div class="ttdef"><b>Definition:</b> fragmenter.h:53</div></div>
<div class="ttc" id="aschc__config_8h_html_a5e6121b65e73cd727a9af2331bf5d897"><div class="ttname"><a href="schc__config_8h.html#a5e6121b65e73cd727a9af2331bf5d897">BITMAP_SIZE_BYTES</a></div><div class="ttdeci">#define BITMAP_SIZE_BYTES</div><div class="ttdef"><b>Definition:</b> schc_config.h:60</div></div>
<div class="ttc" id="astructschc__fragmentation__ack__t_html"><div class="ttname"><a href="structschc__fragmentation__ack__t.html">schc_fragmentation_ack_t</a></div><div class="ttdef"><b>Definition:</b> fragmenter.h:76</div></div>
<div class="ttc" id="astructschc__bitarray__t_html"><div class="ttname"><a href="structschc__bitarray__t.html">schc_bitarray_t</a></div><div class="ttdef"><b>Definition:</b> schc.h:32</div></div>
<div class="ttc" id="astructschc__mbuf__t_html_a01f8d12db0d22e4cc1c8392e7aa87eb2"><div class="ttname"><a href="structschc__mbuf__t.html#a01f8d12db0d22e4cc1c8392e7aa87eb2">schc_mbuf_t::frag_cnt</a></div><div class="ttdeci">uint8_t frag_cnt</div><div class="ttdef"><b>Definition:</b> fragmenter.h:68</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a34281059a41f1b93a203dfff5e54f845"><div class="ttname"><a href="structschc__fragmentation__t.html#a34281059a41f1b93a203dfff5e54f845">schc_fragmentation_t::dtag</a></div><div class="ttdeci">uint8_t dtag</div><div class="ttdef"><b>Definition:</b> fragmenter.h:118</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a2f83092fddf60c20b720b909c4b632a4"><div class="ttname"><a href="structschc__fragmentation__t.html#a2f83092fddf60c20b720b909c4b632a4">schc_fragmentation_t::mic</a></div><div class="ttdeci">uint8_t mic[MIC_SIZE_BYTES]</div><div class="ttdef"><b>Definition:</b> fragmenter.h:108</div></div>
<div class="ttc" id="astructschc__mbuf__t_html_ab7bd5d1755c9d4ce991fe1eb49236ecc"><div class="ttname"><a href="structschc__mbuf__t.html#ab7bd5d1755c9d4ce991fe1eb49236ecc">schc_mbuf_t::len</a></div><div class="ttdeci">uint16_t len</div><div class="ttdef"><b>Definition:</b> fragmenter.h:66</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a3d0044911dc3e6c6c5161f85133771ca"><div class="ttname"><a href="structschc__fragmentation__t.html#a3d0044911dc3e6c6c5161f85133771ca">schc_fragmentation_t::rule_id</a></div><div class="ttdeci">uint8_t rule_id[RULE_SIZE_BYTES]</div><div class="ttdef"><b>Definition:</b> fragmenter.h:102</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a338c5d4c63ddd31949a4230de91310bc"><div class="ttname"><a href="structschc__fragmentation__t.html#a338c5d4c63ddd31949a4230de91310bc">schc_fragmentation_t::attempts</a></div><div class="ttdeci">uint8_t attempts</div><div class="ttdef"><b>Definition:</b> fragmenter.h:124</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a5403c6a449781191d2d5e129baf50843"><div class="ttname"><a href="structschc__fragmentation__t.html#a5403c6a449781191d2d5e129baf50843">schc_fragmentation_t::schc_rule</a></div><div class="ttdeci">struct schc_rule_t * schc_rule</div><div class="ttdef"><b>Definition:</b> fragmenter.h:149</div></div>
<div class="ttc" id="astructschc__mbuf__t_html"><div class="ttname"><a href="structschc__mbuf__t.html">schc_mbuf_t</a></div><div class="ttdef"><b>Definition:</b> fragmenter.h:60</div></div>
<div class="ttc" id="astructschc__fragmentation__ack__t_html_ae3470b3cdcf9e4a38e26ff62dd0f82b3"><div class="ttname"><a href="structschc__fragmentation__ack__t.html#ae3470b3cdcf9e4a38e26ff62dd0f82b3">schc_fragmentation_ack_t::window</a></div><div class="ttdeci">uint8_t window[1]</div><div class="ttdef"><b>Definition:</b> fragmenter.h:82</div></div>
<div class="ttc" id="astructschc__rule__t_html"><div class="ttname"><a href="structschc__rule__t.html">schc_rule_t</a></div><div class="ttdef"><b>Definition:</b> schc.h:128</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a3ae53dfe7edd71d58200c6fb6823f6be"><div class="ttname"><a href="structschc__fragmentation__t.html#a3ae53dfe7edd71d58200c6fb6823f6be">schc_fragmentation_t::end_tx</a></div><div class="ttdeci">void(* end_tx)()</div><div class="ttdef"><b>Definition:</b> fragmenter.h:137</div></div>
<div class="ttc" id="afragmenter_8h_html_a4be088b297563aa42398b23d40868b37"><div class="ttname"><a href="fragmenter_8h.html#a4be088b297563aa42398b23d40868b37">schc_fragment_input</a></div><div class="ttdeci">schc_fragmentation_t * schc_fragment_input(uint8_t *data, uint16_t len, uint32_t device_id)</div><div class="ttdoc">This function should be called whenever a fragment is received an open connection is picked for the d...</div><div class="ttdef"><b>Definition:</b> fragmenter.c:2276</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a177e3d8b7af0f3b3590d8f90dd765a71"><div class="ttname"><a href="structschc__fragmentation__t.html#a177e3d8b7af0f3b3590d8f90dd765a71">schc_fragmentation_t::window</a></div><div class="ttdeci">uint8_t window</div><div class="ttdef"><b>Definition:</b> fragmenter.h:114</div></div>
<div class="ttc" id="afragmenter_8h_html_a20874253e23bc4c1d20f69479175ce6fa6fea2421f5cc1e8bc1ecebd848139362"><div class="ttname"><a href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6fa6fea2421f5cc1e8bc1ecebd848139362">RECV_WINDOW</a></div><div class="ttdef"><b>Definition:</b> fragmenter.h:57</div></div>
<div class="ttc" id="astructschc__mbuf__t_html_ad414fc5cf65894521e5b8131c8ff8618"><div class="ttname"><a href="structschc__mbuf__t.html#ad414fc5cf65894521e5b8131c8ff8618">schc_mbuf_t::next</a></div><div class="ttdeci">struct schc_mbuf_t * next</div><div class="ttdef"><b>Definition:</b> fragmenter.h:72</div></div>
<div class="ttc" id="afragmenter_8h_html_a20874253e23bc4c1d20f69479175ce6fa204deb4800b60b28307aa8a00a85ee36"><div class="ttname"><a href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6fa204deb4800b60b28307aa8a00a85ee36">END_RX</a></div><div class="ttdef"><b>Definition:</b> fragmenter.h:57</div></div>
<div class="ttc" id="aschc_8h_html"><div class="ttname"><a href="schc_8h.html">schc.h</a></div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a3b14a9023ad626cf661a46453fc6919d"><div class="ttname"><a href="structschc__fragmentation__t.html#a3b14a9023ad626cf661a46453fc6919d">schc_fragmentation_t::remove_timer_entry</a></div><div class="ttdeci">void(* remove_timer_entry)(uint32_t device_id)</div><div class="ttdef"><b>Definition:</b> fragmenter.h:139</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_aacb88301231fdf7ebf596250d3b75201"><div class="ttname"><a href="structschc__fragmentation__t.html#aacb88301231fdf7ebf596250d3b75201">schc_fragmentation_t::mtu</a></div><div class="ttdeci">uint16_t mtu</div><div class="ttdef"><b>Definition:</b> fragmenter.h:104</div></div>
<div class="ttc" id="afragmenter_8h_html_a8e32bf67127c30c23e08e9974f02c5f0"><div class="ttname"><a href="fragmenter_8h.html#a8e32bf67127c30c23e08e9974f02c5f0">schc_mbuf_t</a></div><div class="ttdeci">struct schc_mbuf_t schc_mbuf_t</div></div>
<div class="ttc" id="aschc__config_8h_html_adfbf14de3d8d2907750758406ced72db"><div class="ttname"><a href="schc__config_8h.html#adfbf14de3d8d2907750758406ced72db">MIC_SIZE_BYTES</a></div><div class="ttdeci">#define MIC_SIZE_BYTES</div><div class="ttdef"><b>Definition:</b> schc_config.h:57</div></div>
<div class="ttc" id="aschc__config_8h_html"><div class="ttname"><a href="schc__config_8h.html">schc_config.h</a></div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_aadd2eea980b920a4c4e20abf77fff73a"><div class="ttname"><a href="structschc__fragmentation__t.html#aadd2eea980b920a4c4e20abf77fff73a">schc_fragmentation_t::window_cnt</a></div><div class="ttdeci">uint8_t window_cnt</div><div class="ttdef"><b>Definition:</b> fragmenter.h:116</div></div>
<div class="ttc" id="afragmenter_8h_html_a20874253e23bc4c1d20f69479175ce6f"><div class="ttname"><a href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6f">rx_state</a></div><div class="ttdeci">rx_state</div><div class="ttdef"><b>Definition:</b> fragmenter.h:56</div></div>
<div class="ttc" id="astructschc__fragmentation__ack__t_html_ace8c95d14212b116695068cb09141813"><div class="ttname"><a href="structschc__fragmentation__ack__t.html#ace8c95d14212b116695068cb09141813">schc_fragmentation_ack_t::bitmap</a></div><div class="ttdeci">uint8_t bitmap[BITMAP_SIZE_BYTES]</div><div class="ttdef"><b>Definition:</b> fragmenter.h:80</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_ac3fbcae2ee4198df9d04438d63d97361"><div class="ttname"><a href="structschc__fragmentation__t.html#ac3fbcae2ee4198df9d04438d63d97361">schc_fragmentation_t::dc</a></div><div class="ttdeci">uint32_t dc</div><div class="ttdef"><b>Definition:</b> fragmenter.h:106</div></div>
<div class="ttc" id="afragmenter_8h_html_a6a248f74b7a8b0ef5f7dbc3f418e05a8"><div class="ttname"><a href="fragmenter_8h.html#a6a248f74b7a8b0ef5f7dbc3f418e05a8">schc_reassemble</a></div><div class="ttdeci">int8_t schc_reassemble(schc_fragmentation_t *rx_conn)</div><div class="ttdoc">the receiver state machine</div><div class="ttdef"><b>Definition:</b> fragmenter.c:1454</div></div>
<div class="ttc" id="afragmenter_8h_html_ab1b728ad496229979c1eea633a13076d"><div class="ttname"><a href="fragmenter_8h.html#ab1b728ad496229979c1eea633a13076d">schc_get_connection</a></div><div class="ttdeci">schc_fragmentation_t * schc_get_connection(uint32_t device_id)</div><div class="ttdoc">find a connection based on a device id or open a new connection if there was no connection for this d...</div><div class="ttdef"><b>Definition:</b> fragmenter.c:1322</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a95c3a12413953d5878e1a44ddb0da57b"><div class="ttname"><a href="structschc__fragmentation__t.html#a95c3a12413953d5878e1a44ddb0da57b">schc_fragmentation_t::ack</a></div><div class="ttdeci">schc_fragmentation_ack_t ack</div><div class="ttdef"><b>Definition:</b> fragmenter.h:145</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_acf5022a1d397d0501594591d24b6c0bf"><div class="ttname"><a href="structschc__fragmentation__t.html#acf5022a1d397d0501594591d24b6c0bf">schc_fragmentation_t::bitmap</a></div><div class="ttdeci">uint8_t bitmap[BITMAP_SIZE_BYTES]</div><div class="ttdef"><b>Definition:</b> fragmenter.h:122</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html"><div class="ttname"><a href="structschc__fragmentation__t.html">schc_fragmentation_t</a></div><div class="ttdef"><b>Definition:</b> fragmenter.h:92</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_af54664c2e4cfb10cc250896f070f6d5b"><div class="ttname"><a href="structschc__fragmentation__t.html#af54664c2e4cfb10cc250896f070f6d5b">schc_fragmentation_t::post_timer_task</a></div><div class="ttdeci">void(* post_timer_task)(void(*timer_task)(void *conn), uint32_t device_id, uint32_t time_ms, void *arg)</div><div class="ttdef"><b>Definition:</b> fragmenter.h:132</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a2e2e9e70fcb228003fbe7f4306a07be4"><div class="ttname"><a href="structschc__fragmentation__t.html#a2e2e9e70fcb228003fbe7f4306a07be4">schc_fragmentation_t::timer_flag</a></div><div class="ttdeci">uint8_t timer_flag</div><div class="ttdef"><b>Definition:</b> fragmenter.h:141</div></div>
<div class="ttc" id="afragmenter_8h_html_a5c375e7b44652a0eccb9248083a6251d"><div class="ttname"><a href="fragmenter_8h.html#a5c375e7b44652a0eccb9248083a6251d">schc_fragment</a></div><div class="ttdeci">int8_t schc_fragment(schc_fragmentation_t *tx_conn)</div><div class="ttdoc">the sender state machine</div><div class="ttdef"><b>Definition:</b> fragmenter.c:1967</div></div>
<div class="ttc" id="afragmenter_8h_html_a38ccd754938e6c276447dff49f5a3a34a6736812226bab580f621c5e1de53d861"><div class="ttname"><a href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34a6736812226bab580f621c5e1de53d861">WAIT_BITMAP</a></div><div class="ttdef"><b>Definition:</b> fragmenter.h:53</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_ab7f821a4a6b266de4f6cb79970d8ce4c"><div class="ttname"><a href="structschc__fragmentation__t.html#ab7f821a4a6b266de4f6cb79970d8ce4c">schc_fragmentation_t::TX_STATE</a></div><div class="ttdeci">tx_state TX_STATE</div><div class="ttdef"><b>Definition:</b> fragmenter.h:126</div></div>
<div class="ttc" id="afragmenter_8h_html_a20874253e23bc4c1d20f69479175ce6fa781ad2788df9e25c59a70894c7832096"><div class="ttname"><a href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6fa781ad2788df9e25c59a70894c7832096">ABORT</a></div><div class="ttdef"><b>Definition:</b> fragmenter.h:57</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a93c490405c940960cb2dff7c7566be50"><div class="ttname"><a href="structschc__fragmentation__t.html#a93c490405c940960cb2dff7c7566be50">schc_fragmentation_t::RX_STATE</a></div><div class="ttdeci">rx_state RX_STATE</div><div class="ttdef"><b>Definition:</b> fragmenter.h:128</div></div>
<div class="ttc" id="afragmenter_8h_html_a38ccd754938e6c276447dff49f5a3a34a67be7a5f47004345047b32fff72a2230"><div class="ttname"><a href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34a67be7a5f47004345047b32fff72a2230">SEND</a></div><div class="ttdef"><b>Definition:</b> fragmenter.h:53</div></div>
<div class="ttc" id="afragmenter_8h_html_a20874253e23bc4c1d20f69479175ce6fab39d14dff9148f467ef7a253b80b40bd"><div class="ttname"><a href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6fab39d14dff9148f467ef7a253b80b40bd">WAIT_END</a></div><div class="ttdef"><b>Definition:</b> fragmenter.h:57</div></div>
<div class="ttc" id="astructschc__mbuf__t_html_aae4db53402585e2c77bad6a0925b6b7c"><div class="ttname"><a href="structschc__mbuf__t.html#aae4db53402585e2c77bad6a0925b6b7c">schc_mbuf_t::slot</a></div><div class="ttdeci">uint32_t slot</div><div class="ttdef"><b>Definition:</b> fragmenter.h:62</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a81a06b0db6f570800959533e1fd2ce58"><div class="ttname"><a href="structschc__fragmentation__t.html#a81a06b0db6f570800959533e1fd2ce58">schc_fragmentation_t::packet_len</a></div><div class="ttdeci">uint16_t packet_len</div><div class="ttdef"><b>Definition:</b> fragmenter.h:96</div></div>
<div class="ttc" id="astructschc__fragmentation__ack__t_html_a6a75f999fa56f3f64e0c8e555e3da58c"><div class="ttname"><a href="structschc__fragmentation__ack__t.html#a6a75f999fa56f3f64e0c8e555e3da58c">schc_fragmentation_ack_t::dtag</a></div><div class="ttdeci">uint8_t dtag[1]</div><div class="ttdef"><b>Definition:</b> fragmenter.h:84</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a85a9626c3f4d779ed07f3bde3e745143"><div class="ttname"><a href="structschc__fragmentation__t.html#a85a9626c3f4d779ed07f3bde3e745143">schc_fragmentation_t::tail_ptr</a></div><div class="ttdeci">uint8_t * tail_ptr</div><div class="ttdef"><b>Definition:</b> fragmenter.h:100</div></div>
<div class="ttc" id="afragmenter_8h_html_a38ccd754938e6c276447dff49f5a3a34a0f886785b600b91048fcdc434c6b4a8e"><div class="ttname"><a href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34a0f886785b600b91048fcdc434c6b4a8e">ERR</a></div><div class="ttdef"><b>Definition:</b> fragmenter.h:53</div></div>
<div class="ttc" id="afragmenter_8h_html_a38ccd754938e6c276447dff49f5a3a34"><div class="ttname"><a href="fragmenter_8h.html#a38ccd754938e6c276447dff49f5a3a34">tx_state</a></div><div class="ttdeci">tx_state</div><div class="ttdef"><b>Definition:</b> fragmenter.h:52</div></div>
<div class="ttc" id="afragmenter_8h_html_adaabb8a36ff87d9f89d8215b2773c6c7"><div class="ttname"><a href="fragmenter_8h.html#adaabb8a36ff87d9f89d8215b2773c6c7">schc_fragmenter_init</a></div><div class="ttdeci">int8_t schc_fragmenter_init(schc_fragmentation_t *tx_conn, uint8_t(*send)(uint8_t *data, uint16_t length, uint32_t device_id), void(*end_rx)(schc_fragmentation_t *conn), void(*remove_timer_entry)(uint32_t device_id))</div><div class="ttdoc">Initializes the SCHC fragmenter.</div><div class="ttdef"><b>Definition:</b> fragmenter.c:1799</div></div>
<div class="ttc" id="afragmenter_8h_html_a555170940dd8eb3a6b64405f28e4655f"><div class="ttname"><a href="fragmenter_8h.html#a555170940dd8eb3a6b64405f28e4655f">schc_input</a></div><div class="ttdeci">schc_fragmentation_t * schc_input(uint8_t *data, uint16_t len, schc_fragmentation_t *rx_conn, uint32_t device_id)</div><div class="ttdoc">This function should be called whenever a packet is received.</div><div class="ttdef"><b>Definition:</b> fragmenter.c:2194</div></div>
<div class="ttc" id="afragmenter_8h_html_a71d11b7d40657f1abe84aeed57a22b43"><div class="ttname"><a href="fragmenter_8h.html#a71d11b7d40657f1abe84aeed57a22b43">schc_fragmentation_ack_t</a></div><div class="ttdeci">struct schc_fragmentation_ack_t schc_fragmentation_ack_t</div></div>
<div class="ttc" id="astructschc__fragmentation__ack__t_html_a94b9c37ec44b2f4c8158f3196ec7902a"><div class="ttname"><a href="structschc__fragmentation__ack__t.html#a94b9c37ec44b2f4c8158f3196ec7902a">schc_fragmentation_ack_t::rule_id</a></div><div class="ttdeci">uint8_t rule_id[RULE_SIZE_BYTES]</div><div class="ttdef"><b>Definition:</b> fragmenter.h:78</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a4fa56a7c26f1dcdcaed54367974052cb"><div class="ttname"><a href="structschc__fragmentation__t.html#a4fa56a7c26f1dcdcaed54367974052cb">schc_fragmentation_t::bit_arr</a></div><div class="ttdeci">schc_bitarray_t * bit_arr</div><div class="ttdef"><b>Definition:</b> fragmenter.h:98</div></div>
<div class="ttc" id="astructschc__fragmentation__ack__t_html_a9fbf76c0b89c25838cf8f4100f8facea"><div class="ttname"><a href="structschc__fragmentation__ack__t.html#a9fbf76c0b89c25838cf8f4100f8facea">schc_fragmentation_ack_t::mic</a></div><div class="ttdeci">uint8_t mic</div><div class="ttdef"><b>Definition:</b> fragmenter.h:86</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_ad81c9ba5e6a581e013e4b3bafce08474"><div class="ttname"><a href="structschc__fragmentation__t.html#ad81c9ba5e6a581e013e4b3bafce08474">schc_fragmentation_t::frag_cnt</a></div><div class="ttdeci">uint8_t frag_cnt</div><div class="ttdef"><b>Definition:</b> fragmenter.h:120</div></div>
<div class="ttc" id="afragmenter_8h_html_abb5688d5a6d4d0f4f955951b6ee130b1"><div class="ttname"><a href="fragmenter_8h.html#abb5688d5a6d4d0f4f955951b6ee130b1">schc_ack_input</a></div><div class="ttdeci">void schc_ack_input(uint8_t *data, uint16_t len, schc_fragmentation_t *tx_conn, uint32_t device_id)</div><div class="ttdoc">This function should be called whenever an ack is received.</div><div class="ttdef"><b>Definition:</b> fragmenter.c:2215</div></div>
<div class="ttc" id="afragmenter_8h_html_a250ace05899a868a846b1bdaaa30288b"><div class="ttname"><a href="fragmenter_8h.html#a250ace05899a868a846b1bdaaa30288b">schc_fragmentation_t</a></div><div class="ttdeci">struct schc_fragmentation_t schc_fragmentation_t</div></div>
<div class="ttc" id="afragmenter_8h_html_a3b3e7a45b2ff0f407adfcc266f47c3dc"><div class="ttname"><a href="fragmenter_8h.html#a3b3e7a45b2ff0f407adfcc266f47c3dc">mbuf_copy</a></div><div class="ttdeci">void mbuf_copy(schc_mbuf_t *head, uint8_t *ptr)</div><div class="ttdoc">copy the byte alligned contents of the mbuf chain to the passed pointer</div><div class="ttdef"><b>Definition:</b> fragmenter.c:323</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a8a6c636f8d863fc3db680da64ee889c1"><div class="ttname"><a href="structschc__fragmentation__t.html#a8a6c636f8d863fc3db680da64ee889c1">schc_fragmentation_t::RULE_SIZE</a></div><div class="ttdeci">uint8_t RULE_SIZE</div><div class="ttdef"><b>Definition:</b> fragmenter.h:151</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a9507d09aa22017fdee75233eb10ce4eb"><div class="ttname"><a href="structschc__fragmentation__t.html#a9507d09aa22017fdee75233eb10ce4eb">schc_fragmentation_t::fcn</a></div><div class="ttdeci">uint8_t fcn</div><div class="ttdef"><b>Definition:</b> fragmenter.h:112</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a9331778f9d6b6149c749329bc65f3bcb"><div class="ttname"><a href="structschc__fragmentation__t.html#a9331778f9d6b6149c749329bc65f3bcb">schc_fragmentation_t::input</a></div><div class="ttdeci">uint8_t input</div><div class="ttdef"><b>Definition:</b> fragmenter.h:143</div></div>
<div class="ttc" id="afragmenter_8h_html_a20874253e23bc4c1d20f69479175ce6fa9a3cdfd5436e5486043ccdd4e8549dcf"><div class="ttname"><a href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6fa9a3cdfd5436e5486043ccdd4e8549dcf">WAIT_NEXT_WINDOW</a></div><div class="ttdef"><b>Definition:</b> fragmenter.h:57</div></div>
<div class="ttc" id="astructschc__mbuf__t_html_ab60a2b461fb016ef880a366635c4f6d6"><div class="ttname"><a href="structschc__mbuf__t.html#ab60a2b461fb016ef880a366635c4f6d6">schc_mbuf_t::ptr</a></div><div class="ttdeci">uint8_t * ptr</div><div class="ttdef"><b>Definition:</b> fragmenter.h:64</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a87361e46e93bdf8d6f9cb60cb8f0b5de"><div class="ttname"><a href="structschc__fragmentation__t.html#a87361e46e93bdf8d6f9cb60cb8f0b5de">schc_fragmentation_t::device_id</a></div><div class="ttdeci">uint32_t device_id</div><div class="ttdef"><b>Definition:</b> fragmenter.h:94</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_afd9900b8ae4055a3d3014d20ee28ea2d"><div class="ttname"><a href="structschc__fragmentation__t.html#afd9900b8ae4055a3d3014d20ee28ea2d">schc_fragmentation_t::head</a></div><div class="ttdeci">schc_mbuf_t * head</div><div class="ttdef"><b>Definition:</b> fragmenter.h:147</div></div>
<div class="ttc" id="afragmenter_8h_html_a974581b10381381bafe401fc2ddc54c7"><div class="ttname"><a href="fragmenter_8h.html#a974581b10381381bafe401fc2ddc54c7">get_mbuf_len</a></div><div class="ttdeci">uint16_t get_mbuf_len(schc_mbuf_t *head)</div><div class="ttdoc">returns the total length of the mbuf</div><div class="ttdef"><b>Definition:</b> fragmenter.c:282</div></div>
<div class="ttc" id="astructschc__fragmentation__ack__t_html_a777f3b35b0d37bb49b5d41f80c862420"><div class="ttname"><a href="structschc__fragmentation__ack__t.html#a777f3b35b0d37bb49b5d41f80c862420">schc_fragmentation_ack_t::fcn</a></div><div class="ttdeci">uint8_t fcn</div><div class="ttdef"><b>Definition:</b> fragmenter.h:88</div></div>
<div class="ttc" id="aschc_8h_html_ab264125e090b773a3c62c0587e2311f3"><div class="ttname"><a href="schc_8h.html#ab264125e090b773a3c62c0587e2311f3">RULE_SIZE_BYTES</a></div><div class="ttdeci">#define RULE_SIZE_BYTES</div><div class="ttdef"><b>Definition:</b> schc.h:15</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a0db2f7a250e964ee0bad8c0b8cc0b97c"><div class="ttname"><a href="structschc__fragmentation__t.html#a0db2f7a250e964ee0bad8c0b8cc0b97c">schc_fragmentation_t::end_rx</a></div><div class="ttdeci">void(* end_rx)(struct schc_fragmentation_t *conn)</div><div class="ttdef"><b>Definition:</b> fragmenter.h:135</div></div>
<div class="ttc" id="astructschc__mbuf__t_html_a05e49e98a8e2a6df87d42355fa8e6969"><div class="ttname"><a href="structschc__mbuf__t.html#a05e49e98a8e2a6df87d42355fa8e6969">schc_mbuf_t::offset</a></div><div class="ttdeci">uint8_t offset</div><div class="ttdef"><b>Definition:</b> fragmenter.h:70</div></div>
<div class="ttc" id="afragmenter_8h_html_a20874253e23bc4c1d20f69479175ce6fa84114eb766ef9186899ff21358c0b416"><div class="ttname"><a href="fragmenter_8h.html#a20874253e23bc4c1d20f69479175ce6fa84114eb766ef9186899ff21358c0b416">WAIT_MISSING_FRAG</a></div><div class="ttdef"><b>Definition:</b> fragmenter.h:57</div></div>
<div class="ttc" id="astructschc__fragmentation__t_html_a0d771b7ddff550f4e30b238f1a332572"><div class="ttname"><a href="structschc__fragmentation__t.html#a0d771b7ddff550f4e30b238f1a332572">schc_fragmentation_t::send</a></div><div class="ttdeci">uint8_t(* send)(uint8_t *data, uint16_t length, uint32_t device_id)</div><div class="ttdef"><b>Definition:</b> fragmenter.h:130</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
